<!doctype html>
<html lang="zn">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://cdn.bootcss.com/font-awesome/5.11.2/css/all.css">
<link rel="stylesheet" href="css/main.css">
<title>修改管理员信息</title>
</head>

<body>	
<?php
require_once("../conn/conn_db.php");
if($_GET["a_id"] !="" )
{
  $aid = $_GET["a_id"];
   $str ="select * from admin_info where a_id=".$aid ;
   $result= $conn->query($str);
   if ($result->num_rows) {
        $row = $result->fetch_assoc();
?>

<!-- 关闭当前窗口 -->
<label for="menu-item1">
	    <a href="admin_manager.php">
		<i class="fa fa-times-circle"></i>
		<span>关闭</span>
		</a>
</label>

<form action="action/admin_update_do.php" method="post"  enctype="multipart/form-data">
<table >
  <tr>
     <td colspan="2">
       编辑管理员信息
     </td>
  </tr>
  <tr>
     <td>用户名：</td>
     <td><?php echo $row['a_name'] ?></td>
  </tr>
  <tr>
     <td><font color="red">*</font>密码：</td>
     <td><input type="password" name="txt_password" value="<?php echo $row['a_pwd'] ?>"/></td>
  </tr>
  <tr>
     <td class="td_center1">联系电话：</td>
     <td><input type="text"  name="txt_tel" value="<?php echo $row['a_tel'] ?>"/></td>
  </tr>
  <tr>
     <td>邮箱：</td>
     <td><input type="text" name="txt_email" value="<?php echo $row['a_email'] ?>"/></td>
  </tr>
  <tr>
     <td>头像：
	<img src='../<?php echo $row['a_header'];?>' width="58px" height="58px">
	 <input type="hidden" name="txt_image2" value="<?php echo $row['a_header']; ?>"/> <!-- 旧图片 -->
	 </td>
     <td><input type="file" name="txt_image" /></td>  <!-- 新图片 -->
  </tr>

  <tr>
     <td colspan="2" align="center">
     <input type="hidden" name="txt_id" value="<?php echo $row['a_id']; ?>"/>
        <input type="submit" value="保存" />
        <input type="reset" value="清空" />
     </td>
  </tr>
  <tr>
    <td colspan="2"></td>
  </tr> 
</table>
</form>

<?php 
}
}
 else 
 {
   echo "<script>alert('请选择要编辑的管理员信息！');self.location='admin_manager.php'</script>";     
 }
?>
	
</body>
</html>